/*    */ package com.lmpop.frame.util;
/*    */ 
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ 
/*    */ public class NetUtil
/*    */ {
/*    */   public String getIpAddr(HttpServletRequest request)
/*    */   {
/*  7 */     String ip = request.getHeader("x-forwarded-for");
/*  8 */     if ((ip == null) || (ip.length() == 0) || ("unknown".equalsIgnoreCase(ip))) {
/*  9 */       ip = request.getHeader("Proxy-Client-IP");
/*    */     }
/* 11 */     if ((ip == null) || (ip.length() == 0) || ("unknown".equalsIgnoreCase(ip))) {
/* 12 */       ip = request.getHeader("WL-Proxy-Client-IP");
/*    */     }
/* 14 */     if ((ip == null) || (ip.length() == 0) || ("unknown".equalsIgnoreCase(ip))) {
/* 15 */       ip = request.getRemoteAddr();
/*    */     }
/* 17 */     return ip;
/*    */   }
/*    */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.frame.util.NetUtil
 * JD-Core Version:    0.6.0
 */